package com.example.demo1.service;

import com.example.demo1.pojo.person;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Service;

@Service
public class userservice {
    public Boolean loginjudge(String username,String passwd){
        ClassPathXmlApplicationContext classPathXmlApplicationContext=new ClassPathXmlApplicationContext("personBean.xml");
        person myperson = classPathXmlApplicationContext.getBean( "myperson",person.class);
        if (myperson.getUsername().equals(username)&&myperson.getPasswd().equals(passwd)) return true;
        return false;

    }
}
